<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>成绩管理</title>
<%@include file="/view/common/js-css.jsp" %>
</head>
<body>
<div id="frameWrapper" class="frameWrapper">
	<div class="titlebar">
		<p>当前位置：成绩管理<span>/</span>查询学生成绩</p>
	</div>
	<div class="searchbar">
		<form method="post" action="ScoreServlet?command=query">
			<div id="input">
				<div class="inputwraper">
					<span>科目名称：</span>
						<input type="text" name="subjectName" />
				</div>
				<div class="inputwraper">
					<span>班级：</span>
						<input type="text" name="className" />
				</div>
				<div class="inputwraper">
					<span>学生姓名：</span>
						<input type="text" name="studentName" />
				</div>
				<div id="sub-btn">
					<input type="submit" value="搜素">
				</div>
				<div class="clear"></div>
			</div>
		</form>
	</div>
	<div id="table-wrap">
		<table border="1">
			<thead>
				<tr>
					<th>编号</th>
					<th>科目</th>
					<th>班级</th>
					<th>学生姓名</th>
					<th>分数</th>
					<th>是否及格</th>
				</tr>
			</thead>
			<tbody>
			<c:forEach items="${scorePage.list }" var="score" varStatus="v">
				<tr>
					<td>${v.count }</td>
					<td>${score.subjectName }</td>
					<td>${score.className }</td>
					<td>${score.studentName }</td>
					<td>${score.score_score }</td>
					<td>${score.score_ispass }</td>
				</tr>
			</c:forEach>
			</tbody>
		</table>
		<div id="paging">
			<a href="ScoreServlet?command=query&currentPage=1" class="btn btn-getionfo">首页</a>
			<a href="ScoreServlet?command=query&currentPage=${scorePage.currentPage-1<1?1:scorePage.currentPage-1 }" class="btn btn-getionfo">上一页</a>
			&nbsp;&nbsp;&nbsp;&nbsp;
			共<span>${scorePage.totalPages }</span>页
			&nbsp;&nbsp;&nbsp;&nbsp;
			当前第<span>${scorePage.currentPage }</span>页
			&nbsp;&nbsp;&nbsp;&nbsp;
			<a href="ScoreServlet?command=query&currentPage=${scorePage.currentPage+1>scorePage.totalPages?scorePage.totalPages:scorePage.currentPage+1 }" class="btn btn-getionfo">下一页</a>
			<a href="ScoreServlet?command=query&currentPage=${scorePage.totalPages }" class="btn btn-getionfo">末页</a>
		</div>
	</div>
</div>
</body>
</html>